<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>JQueryDom操作</title>
		<link rel="stylesheet" type="text/css" href="css/txt.css" />
		<script src="js/jquery.js" type="text/javascript" charset="utf-8"></script>
	</head>

	<body>
		<div>
			<img><img><img>
		</div>

	</body>

	<script type="text/javascript">
		$(function() {
			// 增加样式init, txt, 然后再删除样式init
			$("img").attr("class","init");
			$("img").addClass("txt");
			// 删除样式init
			$("img").removeClass("init");
		});
	</script>

</html>